find all element in list python

31

indices = [i for i, x in enumerate(my_list) if x == "whatever"]

Comments

Submit
0 Comments